public class Main {
    public static void main(String[] args) {

        SystemExitClass systemExit = new SystemExitClass();
        DisplayHelpClass displayHelp = new DisplayHelpClass();

        Command exitCommand = new ExitCommand(systemExit);
        Command helpCommand = new HelpCommand(displayHelp);

        FunctionButton button1 = new FunctionButton("功能键1");
        FunctionButton button2 = new FunctionButton("功能键2");

        button1.setCommand(exitCommand);
        button2.setCommand(helpCommand);

        button1.click();
        button2.click();
    }
}
